<html>
<head>
    <meta charset="utf-8">
    <title>登入 - API网关</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <#include "config.ftl"/>
    <style>
        body{overflow:hidden;}
        .login{ height:260px;width:260px;padding: 20px;background-color:rgba(0,0,0,0.5);border-radius: 4px;position:absolute;left: 50%;top: 50%; margin:-150px 0 0 -150px;z-index:99;}
        .login h1{ text-align:center; color:#fff; font-size:24px; margin-bottom:20px; }
        .form_code{ position:relative; }
        .form_code .code{ position:absolute; right:0; top:1px; cursor:pointer; }
        .login_btn{ width:100%; }
    </style>
</head>
<body >

<div class="login">
    <h1>API网关系统</h1>
    <form class="layui-form" method="post" action="../index/main">
        <div class="layui-form-item">
            <input class="layui-input" name="username" placeholder="用户名" lay-verify="required" type="text" autocomplete="on">
        </div>
        <div class="layui-form-item">
            <input class="layui-input" name="password" placeholder="密码" lay-verify="required" type="password" autocomplete="on">
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn login_btn" lay-submit lay-filter="login">登录</button>
            </div>
        </div>
        <#if (message)?exists>
            <div class="layui-form-item">
                <span class="layui-input" style="color: red"><i class="layui-icon">&#xe60b;</i>${message}</span>
            </div>
        </#if>
    </form>
</div>
<script>
    layui.use('form', function(){
        var form = layui.form;
        form.on('submit(login)', function(data){
            return true;
        });
    });
</script>
</body>
</html>